
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%-- 
    Document   : login
    Created on : 20-gen-2015, 12.29.28
    Author     : Luigi
--%>

<%@page import="jsf.UsersController"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Personal Dashboard</title>
    </head>
    <jsp:useBean id="userControllerBean" scope="application" class="jsf.UsersController"/>
    <style>
        #header{
            width: 99.3%;
            position: absolute;
            left: 0px;
            float: left;
            height: 36px;
            background: lightblue;
            margin: 0px;
            padding: 0;
            padding-right: 8px;
            font-size: 29px;
            box-shadow: 2px 2px 2px 2px lightgray;
            top: 0px;
        }
        
        button {
            background-color: white;
            border: 0px;
        }
        
        table{
            position:absolute;
            right: 0px;
        }
        
        p {
            float: left;
            color: white;
            margin: 0;
        }
        
        .events div {
            border: w;
            background: lightgoldenrodyellow;
            width: 20%;
            border: lightblue;
            border-style: solid;
            border-width: 1px;
            padding: 10px;
            border-radius: 10px;
            margin-top: 10px;
            }
    </style>
    <body>
        <div id="header">
        <p>Welcome, ${usersController.selected.username}</p>
        <table>
            <tbody>
                <tr>
                    <td>${invitationsController.checkInvitations(usersController.selected)} </td>
                    <td> <a href="views/events/Create.xhtml"><button>Create new event!</button></a> </td>
                    <td> <a href="views/users/Search.xhtml" ><button>Search user!</button></a> </td>
                    <td> <a href="index.xhtml" ><button>Logout</button></a> </td>
                </tr>
            </tbody>
        </table>
        </div>
        
        <br>
        <jsp:useBean id="calendarWeatherFillerBean" scope="session" class="resource.WeatherWrapper" />
        ${calendarWeatherFillerBean.setCity("Milan")}
        <div id="mainContent">
        <br/>
        <br/>
            ${participantsController.create()}
            
            
            ${usersController.displayEvents(false)}
            ${usersController.displayAlert(false)}
        </div>
           
            
        
    </body>
</html>
